﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;

namespace Modules
{
    /// <summary>
    /// 项目参建企业非正常工资单授权
    ///</summary>
    [TableName("project_corp_wage_auth")]
    [Description("项目参建企业非正常工资单授权记录")]
    [PrimaryKey("id", AutoIncrement = true)]
    [CacheSetting(true, PropertyNamesOfArea = "ProjectId")]
    [Serializable]
    public class ProjectCorpWageAuth : IEntity
    {
        /// <summary>
        /// 主键
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目id
        ///</summary>
        [Column("project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// 参建企业id
        ///</summary>
        [Column("corp_id")]
        public int CorpId { get; set; }

        /// <summary>
        /// 允许发放月份
        ///</summary>
        [Column("month")]
        public int Month { get; set; }

        /// <summary>
        /// 允许发放最大金额
        ///</summary>
        [Column("max_pay_amount")]
        public decimal MaxPayAmount { get; set; }

        /// <summary>
        /// 允许发放最多人数
        ///</summary>
        [Column("max_person_count")]
        public int MaxPersonCount { get; set; }

        /// <summary>
        /// 创建时间
        ///</summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

        #endregion IEntity 成员
    }
}